import { Pipe, PipeTransform } from '@angular/core';
import * as moment from 'moment';
@Pipe({
  name: 'time'
})
export class TimePipe implements PipeTransform {

  transform(value: string, type: string = 'YYYY-MM-DD HH:mm:ss'): any {
    return moment(value).format(type);
  }

}
